﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic;
using System.Text;
using Commons;
using DAL;
using DAL.Enums;
using NUnit.Framework;

namespace Entity.Initial.IValue
{
    public class PartnerInit : Ini
    {

        public override void Clear()
        {
            using (var db = new PizzaDataDataContext())
            {
                db.Partner.DeleteBatch(p => true);
            }
        }

        public override void Run1()
        {
            using (PizzaDataDataContext db = new PizzaDataDataContext())
            {
                List<Partner> ls = new List<Partner>()
                                   {
                                       new Partner()
                                           {
                                               ID = 1,
                                               Name = "广州香蕉巴拉",
                                               Zoom = "广州市",
                                               LogoPic = "/Images/Logo.jpg",
                                               Live_QQ = "1234132013241",
                                               Live_Email = "asdfas@1324.com",
                                               Live_Phone_ToComp ="1234",
                                               Live_Phone = "1234123",
                                               Live_Zipcode = "asdf",
                                               Live_Mobile = "1234132",
                                               Live_Address = "asdfasdfasdfjmlzxkcjvoaiertalmdflc",
                                               IsShow_Phone = false,
                                               IsShow_Phone_ToComp =true,
                                           },
                                       new Partner()
                                           {
                                               ID = 2,
                                               Name = "香格拉里",
                                               Zoom = "北京市",
                                               LogoPic = "/Images/Logo.jpg",
                                               Live_QQ = "1234132013241",
                                               Live_Email = "asdfas@1324.com",
                                               Live_Phone_ToComp ="1234",
                                               Live_Phone = "1234123",
                                               Live_Zipcode = "asdf",
                                               Live_Mobile = "1234132",
                                               Live_Address = "asdfasdfasdfjmlzxkcjvoaiertalmdflc",
                                               IsShow_Phone = false,
                                               IsShow_Phone_ToComp =true,
                                           }
                                   };
                db.Partner.InsertAllOnSubmit(ls);
                db.SubmitChanges();
            }
        }

        public override void Run2()
        {

        }

        public override void Run3()
        {

        }

        public override void Run4()
        {

        }

        public override void Run5()
        {

        }

        public override void Run6()
        {

        }
    }
}
